# install_xavier

set -e # exit on first error
SOURCE_DIR="/tmp"

# 1
sudo apt install libasio-dev libtinyxml2-dev

# 2 安装foonathan_memory
cd ${SOURCE_DIR}
rm -rf foonathan-memory/
git clone https://gitee.com/meteora/foonathan-memory.git
cd foonathan-memory/
mkdir build && cd build
cmake.. 
#不指定目录安装
sudo cmake --build . --target install

# 3. 安装FastCDR
cd ${SOURCE_DIR}
rm -rf Fast-CDR
git clone https://gitee.com/Luoyangyang66/Fast-CDR.git
mkdir Fast-CDR/build && cd Fast-CDR/build
cmake ..
sudo cmake --build . --target install

# 4.安装Fast-RTPS-1.9
cd ${SOURCE_DIR}
rm -rf Fast-DDS && git clone https://gitee.com/lucianzhong/Fast-DDS.git --branch v1.5.0
cd Fast-DDS
git checkout v1.5.0
mkdir build && cd build
cmake ..
sudo cmake --build . --target install
